package com.anycl.design.j2ee.servicelocator;

public class Main {

    public static void main(String[] args) {
        Service service = ServiceLocator.getService("ServiceA");
        service.execute();

        service = ServiceLocator.getService("ServiceB");
        service.execute();

        // 从缓存中获取
        service = ServiceLocator.getService("ServiceA");
        service.execute();
    }
}
